<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <style>
    .a {
      width: 100px;
      height: 100px;
      background: greenyellow;
    }

    .b {
      width: 200px;
      height: 200px;
      background: rgb(100, 52, 189);
    }

    .c {
      width: 300px;
      height: 300px;
      background: rgb(142, 145, 14);
    }
  </style>
</head>

<body>
  <div id="app">

    <div class="c" @click.capture="clickc">
      c
      <div class="b" @click.self="clickb">
        b
        <div class="a" @click.once="clicka">a</div>

      </div>

    </div>

    <!-- <form action="/api/user/add" v-on:submit.prevent="handleSubmit">

      <input type="submit" value="提交" />
    </form> -->
    <!-- <a href=""></a> -->

    <input type="text" @keyup.enter="handleEnter()">

  </div>

  <script>
    var vm = new Vue({
      el: "#app",
      data: {
      },
      methods: {
        clicka() {
          console.log('a')
        },
        clickb() {
          console.log('b')
        },
        clickc() {
          console.log('c')
        },
        handleSubmit(){
          console.log('handleSubmit')
        },
        handleEnter(){
          console.log('enter..')
        }
      }
    })

  </script>
</body>

</html>